/**
 * @author wcj
 * @Date 2021/6/2 10:05
 * @Version 1.0
 */
public class QuoteCountTest {

    private Object instance = null;

    private static final int _1MB = 1024 * 1024;
    private Byte[] bigSize = new Byte[2 * _1MB];

    /**
     * JVM并不是使用的引用计数法来确定对象的死亡
     */
    public static void test() {
        QuoteCountTest obj1 = new QuoteCountTest();
        QuoteCountTest obj2 = new QuoteCountTest();
        obj1.instance = obj2;
        obj2.instance = obj1;
        obj1 = null;
        obj2 = null;
        System.gc();
    }

    public static void main(String[] args) {
        test();
    }
}
